package com.zc.ai.pojo;

import com.theokanning.openai.completion.chat.ChatMessage;

import java.util.ArrayList;
import java.util.List;

public class ChatMessageSingleton {
    private static List<ChatMessage> instance;

    private ChatMessageSingleton() { }

    public static synchronized List<ChatMessage> getInstance() {
        if (instance == null) {
            instance = new ArrayList<>();
        }
        return instance;
    }

    public static void clearChatList(){
        getInstance().clear();
    }
}